package com.unknown.wificontrol.ui.images;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;

import com.github.chrisbanes.photoview.PhotoView;
import com.unknown.wificontrol.R;
import com.unknown.wificontrol.bean.FileBean;
import com.unknown.wificontrol.ui.BaseActivity;

import butterknife.BindView;

public class PhotoViewActivity extends BaseActivity {
    @Override
    public int getLayout() {
        return R.layout.layout_photo_view;
    }

    @BindView(R.id.pvView)
    PhotoView pvView;

    @Override
    public void initViews() {
        Bundle bundle = getIntent().getBundleExtra(BUNDLE);
        FileBean bean = (FileBean) bundle.getSerializable("bean");
        Bitmap bitmap = BitmapFactory.decodeFile(bean.path);
        pvView.setImageBitmap(bitmap);
    }
}
